{% extends "../layout.html" %}
{% block head %}
<link rel="stylesheet" href="/public/css/back/common.css">
<script src="/public/js/back/user.js"></script>
<script src="/public/jsLib/paging.js"></script>
<script src="/public/js/back/page.js"></script>
{% endblock %}

{%block main %}
<!--头部-->
<ol class="breadcrumb clear">
    <li><a href="/admin">管理首页</a></li>
    <li><span>用户列表</span></li>
    <li class="addUser">
        <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal">
            <span class="glyphicon glyphicon-plus"></span>
            <a href="javascript:;">添加用户</a>
        </button>
    </li>
</ol>


<!--用户数据表格-->
<table class="table table-bordered table-hover showTab">
    <tr class="theader">
        <th class="select"><input type="checkbox"></th>
        <th>ID</th>
        <th>用户名</th>
        <th>是否是管理员</th>
        <th>操作</th>
    </tr>
    
    {% for user in users%}
    <tr class="trContent">
        <td class="select"><input type="checkbox"></td>
        <td class="userId">{{user._id.toString()}}</td>
        <td class="userName">{{user.userName}}</td>
        <td class="role">
            {% if user.isAdmain %}
                是
            {%else%}
                否
            {%endif%}
        </td>
        <td class="operation">
            <button type="button" class="btn btn-info btn-sm see" data-toggle="modal" data-target="#myModal">查看</button>
            <button type="button" class="btn btn-primary btn-sm edit" data-toggle="modal" data-target="#myModal">编辑</button>
            <button type="button" class="btn btn-danger btn-sm del" data-toggle="modal" data-target="#myModal">删除</button>
        </td>
    </tr>
    {% endfor %}
</table>
<!--模态框-->
{% include "../modalBox.html" %}
<!--分页-->

{% include "../page.html" %}

{%endblock%}